import time

from selenium import webdriver

from ..common.ui.Selector import Selector
import pytest

from .Button import Button
from .PopEdit import PopEdit


def test_pagination():
    browser = webdriver.Chrome()
    browser.maximize_window()
    browser.get("https://fish.iwhalecloud.com/fish-desktop/examples/popedit/index.html")
    time.sleep(2)
    try:
        popEdit = PopEdit(browser, "inputDemo", Selector.ID)
        popEdit.click()
        time.sleep(1)
        Button(browser, "save-button", Selector.ID).click()
    finally:
        browser.close()


if __name__ == '__main__':
    pytest.main(['-s','PopEdit_test.py'])